As a technique for measuring a three-dimensional shape of a measurement target, active measurements are known. In active measurements, a measurement target is captured in a state where patterned light is projected onto it, and the three-dimensional shape (three-dimensional position of each pixel) of the measurement target is acquired from the position of the pattern on the captured image using the principle of triangulation.
One-shot active shape measurement, which can measure a three-dimensional shape with only one image, uses only one image and can perform real-time measurement, and for this reason and others, it has attracted attention as a useful technique in active measurements.
As a method for performing one-shot active shape measurement, a method using a structured light pattern has been known. In the method using a structured light pattern, a measurement target is captured in a state where patterned light is projected onto it, and the three-dimensional shape of the measurement target is acquired from the position of the pattern on the captured image. The method using a structured light pattern has advantages such as high accuracy (at a short distance, in particular), a wide view angle, and a lower cost.
As one example of the methods using a structured light pattern, Non-Patent Document 1 discloses a method using patterned light that is spatially coded. The two-dimensional pattern disclosed in Non-Patent Document 1 has a structure in which pattern constitution elements called “primitive” are two-dimensionally laid out. A window including multiple primitives (e.g., a window that is constituted by 2×3 primitives) can be specified from the multiple primitives included in the window. Accordingly, the three-dimensional position can be calculated by detecting the row of the primitives from the captured image.
On the other hand, as passive measurement, a method for acquiring the three-dimensional shape of a measurement target using two cameras (a so-called stereo camera) is known. In the method using a stereo camera, a method (three-dimensional measurement method using a stereo method) is used, in which a measurement target is captured simultaneously by cameras arranged on the left and right, a corresponding pair of pixels, that is corresponding points, are searched in the acquired images, how far the corresponding points of the left and right images are separated each other in the left-right direction (that is, parallax) is determined, and the three-dimensional position of each of the pixels in the captured images is calculated by applying the principle of triangulation to this parallax.
However, in three-dimensional measurement using a stereo method, the measurement accuracy is directly affected by the surface texture of the measurement target, and thus it is very difficult to detect the corresponding points and calculate the three-dimensional positions for flat surfaces and reflective surfaces with little texture.
To solve such a problem and improve the accuracy of the detection of corresponding points and the calculation of three-dimensional positions, a method has been proposed, in which a stereo camera and one projector is used, patterned light is projected from the projector, a texture is given to the surface of a measurement target, and template matching is performed.
“P. Vuylsteke and A. Oosterlinck, Range Image Acquisition with a Single Binary-Encoded Light Pattern, IEEE PAMI 12(2), pp. 148-164, 1990” is an example of background art (referred to as Non-Patent Document 1 above).